<h1>Sales List</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Date</th>
      <th>Serial</th>
      <th>Total</th>
      <th>Dim</th>
      <th>Client</th>
      <th>User</th>
      <th>Invoice</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($sales as $sale): ?>
    <tr>
      <td><a href="<?php echo url_for('sale/show?id='.$sale->getId()) ?>"><?php echo $sale->getId() ?></a></td>
      <td><?php echo $sale->getDate() ?></td>
      <td><?php echo $sale->getSerial() ?></td>
      <td><?php echo $sale->getTotal() ?></td>
      <td><?php echo $sale->getDim() ?></td>
      <td><?php echo $sale->getClientId() ?></td>
      <td><?php echo $sale->getUserId() ?></td>
      <td><?php echo $sale->getInvoiceId() ?></td>
      <td><?php echo $sale->getCreatedAt() ?></td>
      <td><?php echo $sale->getUpdatedAt() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('sale/new') ?>">New</a>
